import java.util.Scanner;

public class TestAA {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()){
            String str = sc.nextLine();
            char[] cha = str.toCharArray();
            int i = 0;
            while (true){
                i++;
                if(i>=cha.length)
                    break;
                if (cha[i-1]==' '){
                    cha[i] = Character.toUpperCase(cha[i]);
                }
            }
            cha[0] = Character.toUpperCase(cha[0]);
            StringBuilder sb = new StringBuilder();
            for(char c:cha){
                sb.append(c);
            }
            str = sb.toString();
            System.out.println(str);
        }
    }
}



//import java.util.Scanner;
//
//public class TestAA {
//    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//        while (sc.hasNextLine()){
//            String str = sc.nextLine();
//            char[] cha = str.toCharArray();
//            StringBuilder sb = new StringBuilder();
//            int i = 0;
//            int t = 0;
////            while (true){
////                i++;
////                if(i>cha.length)
////                    break;
////
////                if (str.charAt(i)==' '){
//////                    cha[i+1] = Character.toUpperCase(cha[i+1]);
////                    sb.append(str.charAt(i));
////                    t = i;
////                }else if (i == t+1){
////                    sb.append(Character.toUpperCase(str.charAt(i)));
////                }else{
////                    sb.append(str.charAt(i));
////                }
////            }
//            for(char c:cha){
//                sb.append(c);
//            }
//            str = sb.toString();
//            System.out.println(str);
//        }
//    }
//}

